import React from 'react';

const CommentList = (props) => {
  return (
    <div>
      <ul>
        {props.comments.map((item) => (
          <li key={item.id}>
            {item.user} Rating: {item.rating} <br /> {item.comments}{' '}
          </li>
        ))}
      </ul>
    </div>
  );
};

export default CommentList;
